#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Zhangcl
from core.manage import Host_manage
from core.use_cmd import Cmd_operate
from core.use_file import File_operate
class Manage(object):
    def __init__(self):
        pass
    def user_choise(self):
        choise_menu='''
        \033[1;31m
        ---------Welcome----------
        1. 主机管理
        2. 执行命令
        3. 文件上传下载
        4. 退出\033[0m
        '''
        menu_dict={
            '1':Host_manage,
            '2':Cmd_operate,
            '3':File_operate,
            '4':'exit'
        }
        while True:
            print(choise_menu)
            choise = input('请选择>>>').strip()
            if choise in menu_dict:
                if choise == '4':
                    exit()
                else:
                    menu_dict[choise].menu(self)
            else:
                print('输入错误！')
